package com.mmw.ruiji.server.impl;

import com.mmw.ruiji.entity.Category;
import com.mmw.ruiji.mapper.CategoryMapper;
import com.mmw.ruiji.server.CategoryServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServerImpl implements CategoryServer {

    @Autowired
    CategoryMapper categoryMapper;
    @Override
    public List<Category> getCategories() {
        return categoryMapper.getCategories();
    }

    @Override
    public Integer addCategory(String name) {
        return categoryMapper.addCategory(name);
    }

    @Override
    public Integer deleteCategory(Long id) {
        return categoryMapper.deleteCategory(id);
    }


}
